
red_ball=()
bule_ball=()
while True:
    if len(red_ball)<6:
        ball_num=input(">>>:"%(len(ball_num)+1)).strip()
        if ball_num.isdigit():
            ball_num=int(ball_num)
            if ball_num>32 or ball_num<1:
                print("紅球不在範圍内！")
            elif ball_num in ball_num:
                print("该号码已存在！")
            else:
                red_ball.append(ball_num)
        else:
            print("请输入数字！")
    elif len(bule_ball)<2:
        ball_num=input(">>:").strip()
        if ball_num.isdigit():
            ball_num=int(ball_num)
            if ball_num>16 or ball_num<1:
                print("篮球不在范围内！")
            elif ball_num in ball_num:
                print("该号码已存在！")
            else:
                bule_ball.append(ball_num)
        else:
            print("请输入数字！")
print("red_ball")
print("bule_ball")
print("选号完成！")
